using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace WebDauGia.Domain.Models.Mapping
{
    public class PhanQuyenMap : EntityTypeConfiguration<PhanQuyen>
    {
        public PhanQuyenMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.ten)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("PhanQuyens");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.ten).HasColumnName("ten");
            this.Property(t => t.mota).HasColumnName("mota");
        }
    }
}
